package com.finals.finalsscreen.app;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Application.ActivityLifecycleCallbacks;
import android.os.Build;
import android.os.Bundle;

import com.finals.finalsscreen.AcceptCallActivity;

@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class FActivityLifecycleCallbacks implements ActivityLifecycleCallbacks {

	BaseApplication mApp;

	public FActivityLifecycleCallbacks(BaseApplication mApp) {
		this.mApp = mApp;
	}

	@Override
	public void onActivityCreated(Activity activity, Bundle bundle) {

	}

	@Override
	public void onActivityDestroyed(Activity activity) {

	}

	@Override
	public void onActivityPaused(Activity activity) {

	}

	@Override
	public void onActivityResumed(Activity activity) {
		if (activity instanceof AcceptCallActivity) {
			mApp.stopOpenCallActivity();
		}
	}

	@Override
	public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {

	}

	@Override
	public void onActivityStarted(Activity activity) {

	}

	@Override
	public void onActivityStopped(Activity activity) {

	}

}
